package com.cwz.taculture.service.index.impl;

import com.cwz.taculture.mapper.index.IndexMapper;
import com.cwz.taculture.pojo.CommodityPojo;
import com.cwz.taculture.service.index.IndexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class Index_ServiceImpl implements IndexService {


    @Autowired
    private IndexMapper index_mapper;

    /**
     * 查询表中数据
     *
     * @return 表中一列数据
     */
    @Override
    public List<CommodityPojo> SelCommodity() {
        return index_mapper.SelCommodity();
    }

    /**
     * 根据图片路径查询商品详情
     *
     * @param commodityPicture 图片路径
     * @return 商品详情列表
     */
    @Override
    public CommodityPojo SelCommodityBycPiture(String commodityPicture) {
        return index_mapper.SelCommodityBycPiture(commodityPicture);
    }
}
